﻿using System;
using Orchard.ContentManagement;
using Orchard.Core.Routable.Models;

namespace AwesomeSlider.Models
{
    public class SliderPart : ContentPart<SliderPartRecord>, ISliderPart
    {
        public string Name
        {
            get { return this.As<RoutePart>().Title; }
            set { this.As<RoutePart>().Title = value; }
        }

        public String Description
        {
            get
            {
                return Record.Description;
            }
            set
            {
                Record.Description = value;
            }
        }

        public void SetDefault()
        {
            Description = "Please insert a description";
        }
    }
}